#ifndef NOTICEMANAGER_H
#define NOTICEMANAGER_H

#include <QObject>
#include <Utils.h>
#include <ui_index.h>
#include <Entity/DictData.h>
#include <Entity/Notice.h>
#include <api/systemManager/noticemanagerapi.h>
class NoticeManager : public QObject
{
    Q_OBJECT
public:
    explicit NoticeManager(Ui::Index *ui,QObject *parent = nullptr);


private:
    Ui::Index *ui;
    Utils utils;
    int pageSize = 10;
    int total;
    int currentPage = 1;
    int totalPage;
    NoticeManagerApi api;
    QList<DictData> sys_notice_type;
    QList<DictData> sys_notice_status;
    QList<Notice> noticeList;

    void init();
    void getType();
    void initSearchArea();
    void getList();
    void initTable();
    void initPageInfo();

private slots:
    void pageSizeChanged(int index);
    void deleteByIds();
};

#endif // NOTICEMANAGER_H
